<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId><%= @project_name %></groupId>
	<artifactId><%= @project_name %></artifactId><%- unless @options[:heroku] %>
	<packaging>war</packaging><%- end %>
	<version>0.0.1-SNAPSHOT</version>
	<name><%= @project_name %></name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<outputDirectory>${basedir}/<%= Configuration::WEB_INF %>/classes</outputDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
					<wtpversion>2.0</wtpversion>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.14</version>
				<configuration>
					<scanIntervalSeconds>3</scanIntervalSeconds>
					<stopKey>foo</stopKey>
					<stopPort>9999</stopPort>
					<webAppConfig>
						<contextPath>/</contextPath>
					</webAppConfig>
				</configuration>
			</plugin><%- if @options[:heroku] %>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <version>1.1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                        <configuration>
                            <assembleDirectory>target</assembleDirectory>
                            <extraJvmArguments>-Xmx512m</extraJvmArguments>
                            <programs>
                                <program>
                                    <mainClass>Main</mainClass>
                                    <name>webapp</name>
                                </program>
                            </programs>
                        </configuration>
                    </execution>
                </executions>
            </plugin><%- end %>
		</plugins>
	</build>

	<dependencies><% @dependencies.compile_scope.each do |dependency| %>
		<dependency>
			<groupId><%= dependency.group %></groupId>
			<artifactId><%= dependency.name %></artifactId>
			<version><%= dependency.version %></version><% if dependency.has_exclusions? %>
			<exclusions><% dependency.exclusions.each do |exclusion| %>
				<exclusion>
					<groupId><%= exclusion.group %></groupId>
					<artifactId><%= exclusion.name %></artifactId>
				</exclusion><% end %>
			</exclusions><% end %>
		</dependency><% end %>

		<!-- Test dependencies --><% @dependencies.test_scope.each do |dependency| %>
		<dependency>
			<groupId><%= dependency.group %></groupId>
			<artifactId><%= dependency.name %></artifactId>
			<version><%= dependency.version %></version>
			<scope>test</scope>
		</dependency><% end %>

		<!-- Provided dependencies --><% @dependencies.provided_scope.each do |dependency| %>
		<dependency>
			<groupId><%= dependency.group %></groupId>
			<artifactId><%= dependency.name %></artifactId>
			<version><%= dependency.version %></version>
			<scope>provided</scope>
		</dependency><% end %>
	</dependencies>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.5.1</version>
			</plugin>
		</plugins>
	</reporting>
</project>
